COM GENERIC TA CONTROL COMMANDS ACCORDING TO ITU-T V250
COM 
COM VERSION 1.0 
COM 22.11.2004
COM T.KLEINMANN
COM 
COM TWO MOBILES AND ONE STATIONARY PHONE ARE NEEDED
COM 
COM -----------------------------------------------
COM 			ATT globals:
COM		PrimaryMobilePhoneNumber
COM		SecondaryMobilePhoneNumber
COM		PhoneNumber4
COM		PreferredPhoneBookEntry
COM -----------------------------------------------
COM
COM		
COM ATD TEST
COM
COM ToDo:
COM Replace IP from Minimx with Variable

from attglobals import *


COM ATD for VOICE calls

ATD SecondaryMobilePhoneNumber;
WAIT FOR OK
WAIT 1000
WAITFOR (2,'RING')
WAIT 2000
ATH
WAIT FOR OK
WAIT 2000




COM ATD for voice calls with dial modifier

AT+CLIR=1
WAIT FOR OK
WAIT 2000
ATD SecondaryMobilePhoneNumber;
WAIT FOR OK
WAIT 1000
WAITFOR (2,'RING')
WAIT 2000
USERTEST ('Please check that this is an incognito call!')
ATH
WAIT FOR OK
ATCMD(1,'ATDi',SecondaryMobilePhoneNumber,';')
WAIT FOR OK
WAIT 1000
WAITFOR (2,'RING')
WAIT 2000
ATH
WAIT FOR OK
WAIT 2000
AT+CLIR=0
WAIT FOR OK

COM Dial number from telephone book


AT+CPBS='SM'
WAIT FOR OK
MESSAGE('Number in PhoneBook entry ',PreferredPhoneBookEntry,' will be called!')
ATCMD(1,'ATD>',PreferredPhoneBookEntry,';')
WAIT FOR OK
WAIT 1000
USERTEST('Is the correct num ber to be called?')
WAIT 2000
ATH
WAIT FOR OK

COM Dial number from Dialled Calles List
COM Create Dialled Calls List first

ATD SecondaryMobilePhoneNumber;
WAIT FOR OK
WAIT 5000
ATH
WAIT FOR OK
WAIT 1000
ATD PhoneNumber4;
WAIT FOR OK
WAIT 5000
ATH
WAIT FOR OK
WAIT 2000
ATCMD(1,'ATD>DC1',';')
WAIT FOR OK
WAIT 5000
USERTEST('Is the called number the PhoneNumber4 ?')
ATH
WAIT FOR OK
WAIT 2000
ATCMD(1,'ATD>DC2',';')
WAIT FOR OK
WAIT 5000
USERTEST('Is the called number the SecondaryMobilePhoneNumber ?')
ATH
WAIT FOR OK

COM ADTL to dial last call

ATCMD(1,'ATDL',';')
WAIT FOR OK
WAIT 5000
USERTEST('Is the called number the SecondaryMobilePhoneNumber ?')
ATH

WAIT FOR OK


COM ATD for CSD data call

COM Set Fax Class0 (DATA)
AT+FCLASS=0
WAIT FOR OK
COM Set Data Rate To 9600 bps V110. 
COM As an alternative, AT+CBST could be set to 7 (V32). Does not matter here.
AT+CBST=71

COM Dial with parameter I (ISDN) 
ATCMD (1,'ATDI',SecondaryMobilePhoneNumber)

WAIT FOR OK
WAITFOR (2,'RING')
WAIT 5000
ATH
WAIT FOR OK

COM Dial wit + character and fax class1
COM Set Fax class1

AT+FCLASS=1
WAIT FOR OK
ATCMD (1,'ATDPP492842958604')
USERTEST ('Please check that the number that will be dialled has the + as prefix!')
WAIT 5000
ATH
WAIT FOR OK

COM GPRS detach- mobile should attach to GPRS automatically
AT+CGATT=0
WAIT FOR OK



COM Definine PDP context and establish GPRS call with this context

ATCMD(1,'AT+CGDCONT=2,"IP","',AccessPointName,'","213.158.194.194",0,0')
WAIT FOR OK



COM GPRS call using Packed Domain Service

ATCMD(1,'ATD*99***2#')
WAITFOR (1,'CONNECT')
MESSAGE ('Please power cycle mobile!')



COM Definine PDP context and establish GPRS call with this context

ATCMD(1,'AT+CGDCONT=2,"IP","',AccessPointName,'","213.158.194.194",0,0')
WAIT FOR OK


COM GPRS call using IP

ATCMD(1,'ATD*98*2#')
WAITFOR (1,'CONNECT')

MESSAGE ('Please power cycle mobile!')

COM GPRS call without defined PDP context

ATCMD(1,'ATD*99#')
WAITFOR (1,'CONNECT')

MESSAGE ('Please power cycle mobile!')

